package DesignPattern.decorator;

/**
 * @Author self
 * @Date 2025/7/13 11:26
 * @Describe
 */
// 具体装饰器1：加牛奶
class MilkDecorator extends CoffeeDecorator {

    public MilkDecorator(Coffee coffee) {
        super(coffee);
    }

    @Override
    public double cost() {
        return super.cost() + 0.5; // 加0.5元
    }

    @Override
    public String description() {
        return super.description() + ", Milk";
    }
}

